/**
 * 所有跟用户相关的接口
 */

import { ApiResponse, HttpListResp } from '@/types/http.d';
import { default as axios } from '@/utils/request';

/**
 * 简历相关接口
 */
class CommonService {
  // 获取求职者基本信息--简历页使用
  static selectAreaListFromRedis<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectProvinceCityListFromRedis',
      method: 'get',
    });
  }
  //街道
  static selectStreetListByAreaId<T = any>(pid: any) {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/selectStreetListByAreaId/${pid}`,
      method: 'get',
    });
  }
  // 行业集合
  static selectIndustryListFromRedis<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectIndustryListFromRedis',
      method: 'get',
    });
  }

  // 岗位集合
  static selectPositionListFromRedis<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectPositionListFromRedis',
      method: 'get',
    });
  }
  // 岗位集合
  static seekerComplaint<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/seekerComplaint',
      method: 'post',
      data,
    });
  }

  // 岗位集合
  static getPublicityList<T = any>(data: any) {
    return axios<ApiResponse<HttpListResp<T>>>({
      url: '/examinee-web/v1/getPublicityList',
      method: 'post',
      data,
      headers: {
        clientId: 'examinee_web',
      },
    });
  }

  static oddDemandPageList<T = any>(params: any) {
    return axios<ApiResponse<HttpListResp<T>>>({
      baseURL: '/',
      url: '/home-api/v1/odd/oddDemandPageList',
      method: 'get',
      params,
    });
  }

  static selectNotReadAnnouncementNum<T = any>() {
    return axios<ApiResponse<any>>({
      url: '/seeker-web/v1/selectNotReadAnnouncementNum',
      method: 'get',
    });
  }
  //新零工
  static getJobListJiuyeyun<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/getJobListJiuyeyun',
      method: 'get',
      params,
    });
  }
}

export default CommonService;
